@(page: models.cms.PageDto)(block: models.cms.BlockDto)
@contents = @{(block.getData().get("contents")).asInstanceOf[List[models.core.user.UserCommentDto]]}
@vigneron = @{(contents.get(0).getVigneron()).asInstanceOf[models.core.catalog.VigneronDtoInfo]}
@if(contents != null && contents.size()>0){
<h5>@block.getParams().get("title")</h5>
		<div class="fondblanc">
				@for(rating <- vigneron.getRatings()){
					<div id="libellequalite@rating.getType()">Qualité @rating.getType()</div>
					<div id="notequalite@rating.getType()">@rating.getScore()</div>
				}
            <div id="nbretotalavis">@contents.size() avis</div>
        	
        	<div id="listenotes">
            @for(comment <- contents){
                <div class="noteattribuee">
                    <div class="membreavis">
                    @if(comment.getUser().getPicture()!= null) {
						<img width="50" height="50" border="0" src="@routes.Assets.at("upload/vignerons/vignerons2-medium.jpg")">
					} else {
						<img width="50" height="50" border="0" src="@comment.getUser().getPicture()">
					}
                    @comment.getUser().getLogin()</div>
                    @if(comment.getVigneron().getRatings() != null){
	                    @for(rating <- comment.getVigneron().getRatings()){
							<div class="note@rating.getType()avis">@rating.getScore()<BR><span>@rating.getType()</span></div>
						}
					}
                    <div class="commentaireavis">
                        <span class="titreavis">@comment.getTitle()</span><br />
                        <span class="dateavis">écrit le @comment.getDate()</span><br />
                    	@comment.getComment()    	
                    </div>
                </div>
                
            }    
			</div>
        </div>
        <div class="lienVoirTout"><a href="#" title="Voir tout"><img src="images/bouton-voir-tout.png" width="145" height="23" border="0" alt="Voir tout" /></a></div>
}        